package com.mars.proxy;


import com.mars.proxy.cglib.CglibProxy;
import com.mars.proxy.jdk.JdkProxy;

/**
 * @Author King
 * @create 2020/8/26 16:05
 */
public class Test {

    public static void main(String[] args) {

        JdkProxy proxy = new JdkProxy();
        Student target = new Student();
        Person s = (Person) proxy.JdkProxy(target);
        People p = (People) proxy.JdkProxy(target);
        s.study();
        p.run();


        CglibProxy cglibProxy = new CglibProxy();
        Student2 t = new Student2();
        Student2 o = (Student2) cglibProxy.proxy(t);
        o.run();
        o.study();

    }
}
